package com.ruan4.yangjj.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 创建到entity包下面
 * 部门类
 *  1.私有化属性   2.提供getter、setter方法   3.实现序列化
 */
public class Department implements Serializable {
    /**
     * 部门编号
     */
    private int id;
    /**
     * 部门名称
     */
    private String title;
    /**
     * 部门介绍
     */
    private String about;
    /**
     * 子部门  :一个部门会有多个子部门  department
     */
    private List<Department> sub = new ArrayList<Department>();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAbout() {
        return about;
    }

    public void setAbout(String about) {
        this.about = about;
    }

    public List<Department> getSub() {
        return sub;
    }

    public void setSub(List<Department> sub) {
        this.sub = sub;
    }
}
